Release 10.1A: OpenEdge Data Management:
SQL Reference
INSTR
Searches character string
char_expression1for the character stringchar_expression2. The search begins atstart_posofchar_expression1. Ifoccurrenceis specified, thenINSTRsearches for the nth occurrence, where n is the value of the fourth argument.The position (with respect to the start of
char_expression1) is returned if a search is successful. Zero is returned if no match can be found.Syntax
Example
This example illustrates the
INSTRfunction:
Notes
- The first and second arguments must be
CHARACTERdata type.- The third and fourth arguments, if specified, must be
SMALLINTorTINYINTdata type.- The value for start position in a character string is the ordinal number of the character in the string. The very first character in a string is at position 1, the second character is at position 2, the
nth character is at positionn.- If you do not specify
start_pos, a default value of 1 is assumed.- If you do not specify
occurrence, a default value of 1 is assumed.- The result is
INTEGERdata type.- If any of the argument expressions evaluate to
NULL, the result isNULL.- A
char_expressionand the result can contain multi-byte characters.Compatibility
Progress extension
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |